use anton
go
alter procedure  [dbo].[refill_whs]  
as
begin 
declare @cell int
declare @end int
set @cell = 1
set @end = 1+( select [anton].[dbo].[get_whs_width]()) * ( select [anton].[dbo].[get_whs_length]())
  while (@cell < @end) 
  begin
    insert into [dbo].[warehouse]([place],[state]) values (@cell,null)
    SET @cell = @cell + 1
  end
end
--------